/*
 * @Author: zjf
 * @Date: 2023-11-28 21:21:25
 * @LastEditors: zjf
 * @LastEditTime: 2023-12-16 19:42:01
 * @Description: 进度信息
 */
export const formColmuns = [
  // 项目基本信息
  { label: "项目名称", prop: "projectName", dataType: "input", disabled: true },
  { label: "建设单位", prop: "constructionEntity", dataType: "input", disabled: true, },
  { label: "项目所在年度", prop: "projectYear", dataType: "input", append: "年", disabled: true, },
  { label: "工程类别", prop: "projectTypeId", dataType: "dataItem", dataCode: "worksCategory", disabled: true, },
  // 进度信息
  // { label: "统计时间", prop: "statDate", dataType: "date", format: "yyyy-MM-dd", },
  { label: "年度形象进度", prop: "yearlyImageProgress", dataType: "input" },
  { label: "项目阶段", prop: "projectPhase", dataType: "dataItem", dataCode: "overallProjectPhase", },
  // { label: "项目总体进展", prop: "projectProgress", dataType: "input", append: "%", },
  { label: "当前形象进度", prop: "currentImageProgress", dataType: "input" },
  { label: "施工整体进展", prop: "projectProgressCons", dataType: "input", append: "%", },
  { label: "更新时间", prop: "modifyTime", dataType: "modifytime" },
];

export const tableColmuns = [
  { label: "项目名称", prop: "projectName", minWidth: 140, dataType: "input", isNotAutoWrap: true, },
  { label: "建设单位", prop: "constructionEntity", minWidth: 140, dataType: "input", isNotAutoWrap: true, },
  { label: "项目所在年度", prop: "projectYear", minWidth: 140, dataType: "input", isNotAutoWrap: true, },
  { label: "工程类别", prop: "projectTypeId", minWidth: 140, dataType: "dataItem", dataCode: "worksCategory", isNotAutoWrap: true, },
  { label: "年度形象进度", prop: "yearlyImageProgress", minWidth: 140, dataType: "input", isNotAutoWrap: true, },
  { label: "项目阶段", prop: "projectPhase", minWidth: 140, dataType: "dataItem", dataCode: "overallProjectPhase", isNotAutoWrap: true, },
  // { label: "项目总体进展(%)", prop: "projectProgress", minWidth: 140, dataType: "input", isNotAutoWrap: true, append: "%", },
  { label: "施工整体进展", prop: "projectProgressCons", minWidth: 140, dataType: "input", append: "%", isNotAutoWrap: true, },
  { label: "当前形象进度", prop: "currentImageProgress", minWidth: 140, dataType: "input", isNotAutoWrap: true, },
];

export const progressColumns = [
  // {    label: "统计时间",    prop: "statDate",    dataType: "datetime",    format: "yyyy-MM-dd",  },
  { label: "施工阶段", prop: "constructionPhaseId", dataType: "treeSelect", dataCode: "constructionStage", },
  { label: "是否有此阶段", prop: "isHavePhase", dataType: "switch" },
  { label: "进展(%)", prop: "constructionProgress" },
];
export const formData = {
  projectName: "", // 项目名称
  constructionEntity: "", // 建设单位
  projectYear: "", // 项目所在年度
  projectTypeId: "", // 工程类别

  statDate: "", // 统计时间
  yearlyImageProgress: "", // 年度形象进度
  projectPhase: "", // 项目总体阶段
  // projectProgress: "", // 项目总体进展
  currentImageProgress: "", // 当前形象进度
  projectProgressCons: "", // 施工总体进展
};

export const rules = {};

const api = window.$crud("project/progress");
let config = {
  api: api,
  formColmuns: formColmuns,
  tableColmuns: tableColmuns,
  formData: formData,
  rules: rules,
  name: "进度信息",
};

export default config;
